define(['history'],function(_history) {
    function init(href,flag) {
        if(flag) {
            _history.push("document", href);
        }
        var document = getModule();
        getData(document);
        addEvent(document);
        $('#module-content').append(document);
    }

    function getData(module) {

    }

    function addEvent(module) {
        module.find('[data-type]').bind(
            {
                'mouseenter': function(e){
                   var $this = $(this);
                   $this.find('.file-commend').css('display','inline');
                },
                'mouseleave': function(e) {
                   $(this).find('.file-commend').css('display','none');
                }
            }
        );
    }

    function getModule() {
        var document;
        $.ajax({
            async : false,
            method : 'GET',
            url : 'app/lab/document/document.html',
            datType : 'string',
            success : function(response){
                if(typeof(response) === 'string'){
                    document = response;
                }
            }
        });
        return $(document);
    }

    function uploadFile() {

    }



    return {
        init : init
    }

});